﻿FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build
WORKDIR /src
COPY ["HelloTest/HelloTest.csproj", "HelloTest/"]
RUN dotnet restore "HelloTest/HelloTest.csproj"
COPY . .
WORKDIR "/src/HelloTest"
RUN dotnet build "HelloTest.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "HelloTest.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "HelloTest.dll"]